var Receive = { };

Receive.addSubmit = function() {

    if($('#opreate_time').val()==''){
        Feng.info("接收时间不能为空");
        return false;
    }
   //提交信息
    var ajax = new $ax(Feng.ctxPath + "/orderBack/receive_add", function(data){
        if(data.code==200){
            Feng.success("添加成功!");
            window.parent.table1.table.refresh();
            window.parent.ids.splice(0,window.parent.ids.length);
            window.parent.removeAll();
            parent.layer.close(window.parent.table1.layerIndex);
        }else{
            Feng.success(data.message + "!");
        }

    },function(data){
        Feng.error("添加失败!" + data.message + "!");
    });
    ajax.set("ids",$('#ids').val());
    ajax.set("receive_time",$('#receive_time').val());
    ajax.set("sender",$('#sender').val());
    ajax.set("remark",$('#remark').val());
    ajax.start();
}

/**
 * 关闭此对话框
 */
Receive.close = function() {
    parent.layer.close(window.parent.table1.layerIndex);
}
$(function () {
    $('#receive_time').val(laydate.now(0, 'YYYY-MM-DD'));
});
